/*
 * Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?

Would this affect the run-time complexity? How and why?

Write a function to determine if a given target is in the array.
 */
package com.xinpan.exercise;

public class SearchinRotatedSortedArray2 {
    public boolean search(int[] A, int target) {
        // Start typing your Java solution below
        // DO NOT write main() function

        for(int i = 0; i < A.length; i++)
            if(A[i] == target)
                return true;
        return false;
    }
}
